/**
 * Copyright 2011 Joe Choi, All rights reserved.
 */
package tec.fs;

import java.io.File;
import java.util.Arrays;
import java.util.List;

import tao.data.structure.tree.GrowableTree;
import tao.data.structure.tree.Tree;
import tao.data.structure.tree.Trees;

/**
 * @author Joe Choi
 */
public class GrowableFileTree extends FileTree implements GrowableTree<File> {
	public GrowableFileTree(File parent) {
		super(parent);
	}
	
	public GrowableFileTree(File root, List<Tree<File>> sub) {
		super(root, sub);
	}
		
	@Override
	public void add(GrowableTree<File>... trees) {
		if(trees != null) add(Arrays.asList(trees));
	}

	@Override
	public void add(Trees<File> trees) {
		if(trees == null) return;
		getProtectSubtree().addAll(trees.generalize());
	}
	
	@Override
	public void add(List<GrowableTree<File>> treeList) {
		if(treeList != null) getProtectSubtree().addAll(treeList);
	}

	@Override
	public void reAdd(GrowableTree<File> tree) {
		
	}	
}